﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NutriLeaf.Web.Core.Recipe
{
    public class RecipieCategory:IRecipeCategory
    {
        //doubt where is recipie sub category in recipie category class.
        /// <summary>
        /// 
        /// </summary>
        /// <param name="categoryName"></param>
        /// <param name="categoryDescription"></param>
        /// <param name="context"></param>
        public void AddRecipeCategory(string categoryName, string categoryDescription, ref Model.NutriLeafDBEntities context)
        {

            Model.RecipeCategory cat = new Model.RecipeCategory();
            cat.CategoryDescription = categoryDescription;
            cat.CategoryName = categoryName;
            context.RecipeCategories.AddObject(cat);
            context.SaveChanges();
        }

        public void AddRecipeSubCateogy(string categoryName, string categoryDescription, Model.RecipeCategory parentCategory, ref Model.NutriLeafDBEntities context)
        {//doubt
            Model.RecipeCategory cat = new Model.RecipeCategory();
            cat = parentCategory;
            cat.CategoryDescription = categoryDescription;
            cat.CategoryName = categoryName;
            context.RecipeCategories.AddObject(cat);
            context.SaveChanges();
        }

        public void AddRecipeSubCateogy(string categoryName, string categoryDescription, int parentCategoryId, ref Model.NutriLeafDBEntities context)
        {
            
        }

        public List<Model.RecipeCategory> GetSubCategories(int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public Model.RecipeCategory GetParentCategory(int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public Model.RecipeCategory GetRecipeCategory(int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public void RemoveAllSubCategories(int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public void RemoveRecipeCategory(int RecipeCategoyrId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public void AddRecipeToRecipeCategory(int RecipeId, int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public void RemoveRecipeFromRecipeCategory(int RecipeId, int RecipeCategoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public List<Model.RecipeCategory> GetRecipeCategoriesOfRecipe(int RecipeId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }

        public List<Model.Recipe> GetRecipesInCategory(int categoryId, ref Model.NutriLeafDBEntities context)
        {
            throw new NotImplementedException();
        }
    }
}